﻿<Window x:Class="WPFXMPPClient.BlankWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib" 
        xmlns:location="clr-namespace:LocationClasses;assembly=LocationClasses"
        AllowsTransparency="True" WindowStyle="None"
        MouseDown="Window_MouseDown"  ResizeMode="CanResizeWithGrip" Loaded="Window_Loaded"
        Title="Options">

    <Window.Resources>
        <ObjectDataProvider x:Key="mapTypeData"
                    MethodName="GetValues" 
                    ObjectType="{x:Type sys:Enum}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="location:MapType" />
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Window.Resources>
    
    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFBBFF81" Offset="0"/>
            <GradientStop Color="#FFEEFFDF" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>


    <Border BorderBrush="Black" BorderThickness="1" CornerRadius="2" >

        <Grid x:Name="LayoutRoot" Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            
            

            <Border Grid.Row="0"  BorderThickness="1">
                <Border.BorderBrush >
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0"/>
                        <GradientStop Color="Gray" Offset="1"/>
                    </LinearGradientBrush>
                </Border.BorderBrush>
            </Border>

            <Grid Margin="0,5" Grid.Row="0" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="357*" />
                    <ColumnDefinition Width="40" />
                    <ColumnDefinition Width="40" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.ColumnSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" FontWeight="Bold" Text="Options"></TextBlock>
                <!--<s:SurfaceButton ToolTip="Save" IsEnabled="{Binding bDirty}" Grid.Column="1" x:Name="ButtonSave" Click="ButtonSave_Click"  Height="40"  Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" >
                    <Image Source="Images/check.png" Width="30" Height="20" VerticalAlignment="Center" Margin="0" />
                </s:SurfaceButton>-->
                <Button Style="{DynamicResource ButtonSurface}" ToolTip="Close" Grid.Column="2" x:Name="ButtonClose" Click="ButtonClose_Click"  Height="40"  Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" >
                    <Image Source="Images/calculator - multiply.png" Width="30" Height="20" VerticalAlignment="Center" Margin="0" />
                </Button>
            </Grid>

            <ListBox Visibility="Collapsed" SelectionMode="Multiple" Grid.Row="1" Margin="3,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                 DataContext="{Binding Conversation}" Background="Beige" x:Name="ListBoxConversation">
                <ListBox.ItemTemplate>
                    <DataTemplate>

                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="70" />
                                <ColumnDefinition Width="400*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>

                            <Image Grid.RowSpan="1" Grid.Column="0" Grid.Row="0" Width="32" Height="32" Source="Images/File.png" />

                            <TextBlock Grid.Column="1" Grid.Row="0"  Text="{Binding StringValue}" FontSize="12" TextWrapping="Wrap" />
                            <ProgressBar Grid.Column="1" Grid.Row="1" Height="20"  Value="{Binding PercentTransferred}" Maximum="100" />

                            <!--Accept or Cancel, only visible for incoming request-->
                            <StackPanel Grid.Column="1" Visibility="{Binding IsVisibleSendCancel, Mode=OneWay}" Grid.Row="2"  Orientation="Horizontal">
                                <Button x:Name="ButtonCancelSend" Click="ButtonCancelSend_Click">Cancel</Button>
                            </StackPanel>
                            <StackPanel Grid.Column="1" Grid.Row="2"  Orientation="Horizontal">
                                <Button Style="{DynamicResource ButtonSurface}" Margin="5,0" Visibility="{Binding IsAcceptCancelVisible, Mode=OneWay}" x:Name="ButtonAcceptTransfer" Click="ButtonAcceptTransfer_Click">Accept</Button>
                                <Button Style="{DynamicResource ButtonSurface}" Margin="5,0" Visibility="{Binding IsAcceptCancelVisible, Mode=OneWay}" x:Name="ButtonDeclineTransfer" Click="ButtonDeclineTransfer_Click">Decline</Button>
                                <!--<s:SurfaceButton Margin="5,0" Visibility="{Binding IsSaveVisible, Mode=OneWay}" x:Name="ButtonSaveFile" Click="ButtonSaveFile_Click" Content="Save" />-->
                                <Button Style="{DynamicResource ButtonSurface}" Margin="5,0" Visibility="{Binding IsSaveVisible, Mode=OneWay}" x:Name="ButtonOpenFile" Click="ButtonOpenFile_Click"  Content="Open" />
                            </StackPanel>

                        </Grid>

                    </DataTemplate>
                </ListBox.ItemTemplate>

            </ListBox>

            <Grid Grid.Row="1" Background="Beige" Margin="3,3,3,3">

                <!--<Grid Margin="5,5,5,5" Background="White">-->

                    <Expander Background="White" Header="Map Properties" IsExpanded="True" Margin="10,10,10,10">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="40"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
<!--
                        //Map Parameters:

    //size (required) defines the rectangular dimensions of the map image. This parameter takes a string of the form {horizontal_value}x{vertical_value}. For example, 500x400 defines a map 500 pixels wide by 400 pixels high. Maps smaller than 180 pixels in width will display a reduced-size Google logo. This parameter is affected by the scale parameter, described below; the final output size is the product of the size and scale values.
    //scale (optional) affects the number of pixels that are returned. scale=2 returns twice as many pixels as scale=1 while retaining the same coverage area and level of detail (i.e. the contents of the map don't change). This is useful when developing for high-resolution displays, or when generating a map for printing. The default value is 1. Accepted values are 2 and 4 (4 is only available to Maps API for Business customers.) See Scale Values for more information.
    // (Default scale value is 1; accepted values are 1, 2, and (for Maps API for Business customers only) 4).

    //format (optional) defines the format of the resulting image. By default, the Static Maps API creates PNG images. There are several possible formats including GIF, JPEG and PNG types. Which format you use depends on how you intend to present the image. JPEG typically provides greater compression, while GIF and PNG provide greater detail. For more information, see Image Formats.
    //maptype (optional) defines the type of map to construct. There are several possible maptype values, including roadmap, satellite, hybrid, and terrain. For more information, see Static Maps API Maptypes below.
    //language (optional) defines the language to use for display of labels on map tiles. Note that this parameter is only supported for some country tiles; if the specific language requested is not supported for the tile set, then the default language for that tileset will be used.
    //region (optional) defines the appropriate borders to display, based on geo-political sensitivities. Accepts a region code specified as a two-character ccTLD ('top-level domain') value.

    //    The table below shows the maximum allowable values for the size parameter at each scale value.

    //API	                        scale=1	    scale=2	                                scale=4
    //Free	                        640x640	    640x640 (returns 1280x1280 pixels)	    Not available.
    //Google Maps API for Business	2048x2048	1024x1024 (returns 2048x2048 pixels)	512x512 (returns 2048x2048 pixels)
                 -->
                        <Label Margin="3,3,3,3" Grid.Row="0" Grid.Column="0">Size</Label>
                        <StackPanel  Margin="3,3,3,3" Orientation="Horizontal" Grid.Row="0" Grid.Column="1">
                            <TextBox Width="80" x:Name="TextBoxSizeHorizontal" Text="{Binding MapParameters.Size.Horizontal, Mode=TwoWay}" TextChanged="TextBoxSizeHorizontal_TextChanged"></TextBox>
                            <Label>x</Label>
                            <TextBox Width="80"  x:Name="TextBoxSizeVertical" Text="{Binding MapParameters.Size.Vertical, Mode=TwoWay}" TextChanged="TextBoxSizeVertical_TextChanged"></TextBox>
                            <Label>Pixels</Label>
                        </StackPanel>

                        <Label Margin="3,3,3,3" Grid.Row="1" Grid.Column="0">Map Type</Label>
                        <ComboBox  Margin="3,3,3,3" Width="Auto"  Grid.Row="1" Grid.Column="1" x:Name="ComboBoxMapType" SelectedValue="{Binding MapParameters.Maptype, Mode=TwoWay}" ItemsSource="{Binding Source={StaticResource mapTypeData}}" SelectionChanged="ComboBoxMapType_SelectionChanged"></ComboBox>

                        <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Right">
                        <Button Style="{DynamicResource ButtonSurface}" Width="60" ToolTip="Save" IsEnabled="{Binding bDirty}" x:Name="ButtonSave" Click="ButtonSave_Click"  Height="40"  Padding="0" Margin="0,0,8,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" >
                            <TextBlock Text="Save"></TextBlock>
                            <!-- <Image Source="Images/check.png" Width="30" Height="20" VerticalAlignment="Center" Margin="0" /> -->
                        </Button>
                            
                        <Button Style="{DynamicResource ButtonSurface}" Width="60" ToolTip="Cancel" x:Name="ButtonCancel" Click="ButtonClose_Click"  Height="40"  Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" >
                                <TextBlock Text="Cancel"></TextBlock>
                            <!-- <Image Source="Images/check.png" Width="30" Height="20" VerticalAlignment="Center" Margin="0" /> -->
                        </Button>
                        </StackPanel>

                    </Grid>

                </Expander>
                <!--</Grid>-->
            </Grid>


        </Grid>

    </Border>

</Window>
